<template>
  <ul class="todo-list">
    <!-- completed: 完成的类名 -->
    <li class="{ completed: obj.isDone}" v-for="(obj,index) in list" :key='obj.id'>
      <div class="view">
        <input v-model="obj.isDone" class="toggle" type="checkbox" />
        <label> {{ obj.name }} </label>
        <button @click="delFn(index)" class="destroy"></button>
      </div>
    </li>
  </ul>
  
</template>

<script>
export default {
  props: ['list']
}
</script>